package com.hskn.hss.module.cases.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

/**
 * <p>
 *
 * </p>
 *
 * @author hskn
 * @since 2021-05-18
 */
@Data
@EqualsAndHashCode(callSuper = false)
public class CasesCharts2 implements Serializable {
    private String createTime;
    /**
     * 全部
     */
    @TableField(exist = false)
    private Integer allCount;
    /**
     * 待分派
     */
    @TableField(exist = false)
    private Integer toBeDistributedCount;
    /**
     * 待处理
     */
    @TableField(exist = false)
    private Integer toBePendedCount;
    /**
     * 待结案
     */
    @TableField(exist = false)
    private Integer toBeOverCount;
    /**
     * 已结案
     */
    @TableField(exist = false)
    private Integer overedCount;
    /**
     * 已废弃
     */
    @TableField(exist = false)
    private Integer abandonedCount;
    /**
     * 逾期
     */
    @TableField(exist = false)
    private Integer isOverdueCount;
    /**
     * 未逾期
     */
    @TableField(exist = false)
    private Integer noOverdueCount;

    @TableField(exist = false)
    private List <Integer> resList;

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public Integer getAllCount() {
        return allCount;
    }

    public void setAllCount(Integer allCount) {
        this.allCount = allCount;
    }

    public Integer getToBeDistributedCount() {
        return toBeDistributedCount;
    }

    public void setToBeDistributedCount(Integer toBeDistributedCount) {
        this.toBeDistributedCount = toBeDistributedCount;
    }

    public Integer getToBePendedCount() {
        return toBePendedCount;
    }

    public void setToBePendedCount(Integer toBePendedCount) {
        this.toBePendedCount = toBePendedCount;
    }

    public Integer getToBeOverCount() {
        return toBeOverCount;
    }

    public void setToBeOverCount(Integer toBeOverCount) {
        this.toBeOverCount = toBeOverCount;
    }

    public Integer getOveredCount() {
        return overedCount;
    }

    public void setOveredCount(Integer overedCount) {
        this.overedCount = overedCount;
    }

    public Integer getAbandonedCount() {
        return abandonedCount;
    }

    public void setAbandonedCount(Integer abandonedCount) {
        this.abandonedCount = abandonedCount;
    }

    public Integer getIsOverdueCount() {
        return isOverdueCount;
    }

    public void setIsOverdueCount(Integer isOverdueCount) {
        this.isOverdueCount = isOverdueCount;
    }

    public Integer getNoOverdueCount() {
        return noOverdueCount;
    }

    public void setNoOverdueCount(Integer noOverdueCount) {
        this.noOverdueCount = noOverdueCount;
    }

    public List<Integer> getResList() {
        resList=new LinkedList<>();
//        if(flag.equals("2")){
            if (allCount!=null) {
                resList.add(allCount);
            } else {
                resList.add(0);
            }
            if (toBeDistributedCount!=null) {
                resList.add(toBeDistributedCount);
            } else {
                resList.add(0);
            }
            if (toBePendedCount!=null) {
                resList.add(toBePendedCount);
            } else {
                resList.add(0);
            }
            if (toBeOverCount!=null) {
                resList.add(toBeOverCount);
            } else {
                resList.add(0);
            }
            if (overedCount!=null) {
                resList.add(overedCount);
            } else {
                resList.add(0);
            }
            if (abandonedCount!=null) {
                resList.add(abandonedCount);
            } else {
                resList.add(0);
            }
//        }else {
            if (allCount!=null) {
                resList.add(allCount);
            } else {
                resList.add(0);
            }
            if (isOverdueCount!=null) {
                resList.add(isOverdueCount);
            } else {
                resList.add(0);
            }
            if (noOverdueCount!=null) {
                resList.add(noOverdueCount);
            } else {
                resList.add(0);
            }
//        }
        return resList;
    }

    public void setResList(List<Integer> resList) {
        this.resList = resList;
    }

}
